package com.woniu.rabbit.controller;

import com.woniu.common.utils.ResponseData;

import com.woniu.common.dto.ForOrderProductDTO;
import com.woniu.rabbit.service.ZyOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author ltyipx
 * @version 1.0
 * @description:TODO
 * @date 2024/8/7 9:40
 */
@RestController
public class OrderController {
    @Autowired
    private ZyOrderService orderService;
    @PostMapping("/addOrder")
    public ResponseData addOrder(@RequestBody List<ForOrderProductDTO> productDTO){
        return orderService.addOrder(productDTO);
    }
}
